using System.Collections.Generic;
using Microsoft.VisualStudio.Debugger.Interop;

// These public sealed classes use a generic enumerator implementation to create the various enumerators required by the engine.
// They allow the enumeration of everything from programs to breakpoints.
namespace Red.Scripts.Debugger.Defines.Enumerators
{
    public sealed class Program : Base<IDebugProgram2, IEnumDebugPrograms2>, IEnumDebugPrograms2
    {
        #region C-Tor

        public Program( IDebugProgram2[] data ) : base( data )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugProgram2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class FrameInfo : Base<FRAMEINFO, IEnumDebugFrameInfo2>, IEnumDebugFrameInfo2
    {
        #region C-Tor

        public FrameInfo( FRAMEINFO[] data )
            : base( data )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, FRAMEINFO[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class PropertyInfo : Base<DEBUG_PROPERTY_INFO, IEnumDebugPropertyInfo2>, IEnumDebugPropertyInfo2
    {
        #region C-Tor

        public PropertyInfo( DEBUG_PROPERTY_INFO[] data )
            : base( data )
        {
        }

        #endregion C-Tor
    }

    public sealed class Thread : Base<IDebugThread2, IEnumDebugThreads2>, IEnumDebugThreads2
    {
        #region C-Tor

        public Thread( IList<IDebugThread2> threads )
            : base( threads )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugThread2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class Module : Base<IDebugModule2, IEnumDebugModules2>, IEnumDebugModules2
    {
        #region C-Tor

        public Module( IDebugModule2[] modules )
            : base( modules )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugModule2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class Property : Base<DEBUG_PROPERTY_INFO, IEnumDebugPropertyInfo2>, IEnumDebugPropertyInfo2
    {
        #region C-Tor

        public Property( DEBUG_PROPERTY_INFO[] properties )
            : base( properties )
        {
        }

        #endregion C-Tor
    }

    public sealed class CodeContext : Base<IDebugCodeContext2, IEnumDebugCodeContexts2>, IEnumDebugCodeContexts2
    {
        #region C-Tor

        public CodeContext( IDebugCodeContext2[] codeContexts )
            : base( codeContexts )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugCodeContext2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class BoundBreakpoints : Base<IDebugBoundBreakpoint2, IEnumDebugBoundBreakpoints2>, IEnumDebugBoundBreakpoints2
    {
        #region C-Tor

        public BoundBreakpoints( IDebugBoundBreakpoint2[] breakpoints )
            : base( breakpoints )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugBoundBreakpoint2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class ErrorBreakpoints : Base<IDebugErrorBreakpoint2, IEnumDebugErrorBreakpoints2>, IEnumDebugErrorBreakpoints2
    {
        #region C-Tor

        public ErrorBreakpoints( IDebugErrorBreakpoint2[] breakpoints )
            : base( breakpoints )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugErrorBreakpoint2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }

    public sealed class Port : Base<IDebugPort2, IEnumDebugPorts2>, IEnumDebugPorts2
    {
        #region C-Tor

        public Port( IDebugPort2[] ports )
            : base( ports )
        {
        }

        #endregion C-Tor

        #region Next Wrapper

        public int Next( uint celt, IDebugPort2[] rgelt, ref uint celtFetched )
        {
            return Next( celt, rgelt, out celtFetched );
        }

        #endregion Next Wrapper
    }
}
